import Vue from "vue"
import Vuex from "vuex"
import createPersistedState from "vuex-persistedstate"
import userInfo from './modules/userInfo'
import common from './modules/common'
import menu from './modules/menu'
import mobile from './modules/mobile'
import dialogDetali from "@/store/modules/dialogDetali";
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    menuInfo: null,
    mobileUserInfo: null, // 用户填报的个人信息
  },
  mutations: {
    setMenuInfo(state, v) {
      state.menuInfo = v;
    },
    setMobileUserInfo(state,v){
      state.mobileUserInfo = v;
    }
  },
  actions: {},
  modules: {
    userInfo,
    common,
    menu,
    mobile,
    dialogDetali
  },
  plugins: [createPersistedState({
    storage: window.sessionStorage
  })]
})
